//
//  CallSeverViewController.m
//  SDHuiYuShoping
//
//  Created by luojiao on 2017/6/22.
//  Copyright © 2017年 luojiao. All rights reserved.
//

#import "CallSeverViewController.h"

@interface CallSeverViewController ()

@end

@implementation CallSeverViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //设置返回按钮
    [self.backButton setImage:[UIImage imageNamed:@"back_white_btn"] forState:UIControlStateNormal];
    [self.backButton setImageEdgeInsets:UIEdgeInsetsMake(0, -50, 0, 0)];
    [self.backButton setTitle:@"返回" forState:UIControlStateNormal];
    [self.backButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -40, 0, 0)];
    
    [self.callButton setImage:[UIImage imageNamed:@"change_bg"] forState:UIControlStateNormal];
    [self.callButton setTitle:@"点击拨打" forState:UIControlStateNormal];
    [self.callButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -260, 0, 0)];
    
    self.phoneNum.text = @"18954554564";
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)backButton:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (IBAction)callButton:(id)sender
{
    NSMutableString* str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",self.phoneNum.text];
    // NSLog(@"str======%@",str);
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
